<div class="view" id="c<?php echo $data->id; ?>">

    <b><?php echo CHtml::encode($data->getAttributeLabel('id')); ?>:</b>
    <?php echo CHtml::encode($data->id); ?>
    <br />

    <b><?php echo CHtml::encode($data->getAttributeLabel('datetime')); ?>:</b>
    <?php echo CHtml::encode(Yii::app()->dateFormatter->formatDateTime($data->datetime, 'medium', 'medium')); ?>    
    <br />

    <b><?php echo CHtml::encode($data->getAttributeLabel('status_id')); ?>:</b>
    <span style="color: red"><?php echo CHtml::encode($data->status->status); ?></span>
    <br />

    <b><?php echo CHtml::encode($data->getAttributeLabel('customer_id')); ?>:</b>
    <?php echo CHtml::encode($data->users->username); ?>
    <br />

    <b><?php echo "Email"; ?>:</b>
    <?php echo CHtml::mailto($data->users->email); ?>
    <br />

    <b><?php echo CHtml::encode($data->getAttributeLabel('totalprice')); ?>:</b>
    <?php echo CHtml::encode($data->totalprice); ?>
    <br />
    <?php
    if ($data->status_id == 5) {
        echo CHtml::linkButton('Đã thu tiền', array(
            'submit' => array('order/collect', 'id' => $data->id),
        ));
    }
    ?>


</div>